package com.weichuang;
//唯创50班 刘昕坤
public class javaMain {
    public static void main(String[] args) {
        int[] arr = {11, 22, 33};
        change(arr);
    }
    public static void change(int[] arr) {
        System.out.print('[');
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]);
            for (int j = i; j < i + 1; j++) {
                if (i == arr.length - 1) {// ]和,都是往元素后插的内容，用i判断是不是到数组末尾
                    System.out.print(']');
                } else {
                    System.out.print(',');
                }
            }
        }
    }
}
